Skip to main content
Version: 8.4.10.4

MarRiskCounter

V8 Message Definiton

Values in this table represent current (live) SpiderRock MAR risk counters for a risk group/risk firm combination.\nA risk group is typically a group of client accounts that have a common beneficial owner. A risk firm is a firm with control of the corresponding risk settings for the risk group.

METADATA

AttributeValue
Topic4625-risk-counter
MLink TokenClientControl
ProductSRControl
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
ticker_atenum - AssetTypePRI'None'ANYANY represents the entire control group
ticker_tsenum - TickerSrcPRI'None'ANYANY represents the entire control group
ticker_tkVARCHAR(12)PRI''ANYANY represents the entire control group
riskGroupVARCHAR(16)PRI''
riskFirmVARCHAR(16)PRI''client firm that can viewedit this record
isTestAccntenum - YesNoPRI'None'
sysRealmenum - SysRealm'None'
sysEnvironmentenum - SysEnvironment'None'original source sys environment Stable Current etc
riskEngineVARCHAR(32)''EE engine name
liveMarginAccFLOAT0live net per symbol total portfolio startofday positions day trades margin can include external sources
liveMarginDayFLOAT0live net per symbol day portfolio day trades only margin can include external sources
liveOpenExposureFLOAT0live abs open child order Delta no netting open child orders only
dayFutCnBotINT0day future contracts bot
dayFutCnSldINT0day future contracts sld
accFutCnNetINT0accnt future contracts net can be startofday positions day trades
dayMarginUDnVDnFLOAT0day margin UPrcDnVolDn
dayMarginUDnVUpFLOAT0day margin UPrcDnVolUp
dayMarginUUpVDnFLOAT0day margin UPrcUpVolDn
dayMarginUUpVUpFLOAT0day margin UPrcUpVolUp
accMarginUDnVDnFLOAT0acc margin UPrcDnVolDn
accMarginUDnVUpFLOAT0acc margin UPrcDnVolUp
accMarginUUpVDnFLOAT0acc margin UPrcUpVolDn
accMarginUUpVUpFLOAT0acc margin UPrcUpVolUp
counterINT0
timestampDATETIME(6)'1900-01-01 00:00:00.000000'timestamp of latest change

PRIMARY KEY DEFINITION (Unique)

FieldSequence
ticker_tk1
ticker_at2
ticker_ts3
riskGroup4
riskFirm5
isTestAccnt6

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRControl`.`MsgMarRiskCounter` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' represents the entire control group',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' represents the entire control group',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT '''*-ANY-ANY'' represents the entire control group',
`riskGroup` VARCHAR(16) NOT NULL DEFAULT '',
`riskFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'client firm that can view/edit this record',
`isTestAccnt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`sysRealm` ENUM('None','SysTest','NMS','CME','FR2','LD4','DR') NOT NULL DEFAULT 'None',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None' COMMENT 'original (source) sys environment [Stable, Current, etc]',
`riskEngine` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'EE engine name',
`liveMarginAcc` FLOAT NOT NULL DEFAULT 0 COMMENT 'live net (per symbol) total portfolio (start-of-day positions + day trades) margin (can include external sources)',
`liveMarginDay` FLOAT NOT NULL DEFAULT 0 COMMENT 'live net (per symbol) day portfolio (day trades only) margin (can include external sources)',
`liveOpenExposure` FLOAT NOT NULL DEFAULT 0 COMMENT 'live abs open child order $Delta (no netting) (open child orders only)',
`dayFutCnBot` INT NOT NULL DEFAULT 0 COMMENT 'day future contracts bot',
`dayFutCnSld` INT NOT NULL DEFAULT 0 COMMENT 'day future contracts sld',
`accFutCnNet` INT NOT NULL DEFAULT 0 COMMENT 'accnt future contracts (net) [can be +/-] (start-of-day positions + day trades)',
`dayMarginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcDn/VolDn)',
`dayMarginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcDn/VolUp)',
`dayMarginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcUp/VolDn)',
`dayMarginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcUp/VolUp)',
`accMarginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'acc margin (UPrcDn/VolDn)',
`accMarginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'acc margin (UPrcDn/VolUp)',
`accMarginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'acc margin (UPrcUp/VolDn)',
`accMarginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'acc margin (UPrcUp/VolUp)',
`counter` INT NOT NULL DEFAULT 0,
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of latest change',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`riskGroup`,`riskFirm`,`isTestAccnt`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Values in this table represent current (live) SpiderRock MAR risk counters for a risk group/risk firm combination.\nA risk group is typically a group of client accounts that have a common beneficial owner. A risk firm is a firm with control of the corresponding risk settings for the risk group.';

SELECT TABLE EXAMPLE QUERY

SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`riskGroup`,
`riskFirm`,
`isTestAccnt`,
`sysRealm`,
`sysEnvironment`,
`riskEngine`,
`liveMarginAcc`,
`liveMarginDay`,
`liveOpenExposure`,
`dayFutCnBot`,
`dayFutCnSld`,
`accFutCnNet`,
`dayMarginUDnVDn`,
`dayMarginUDnVUp`,
`dayMarginUUpVDn`,
`dayMarginUUpVUp`,
`accMarginUDnVDn`,
`accMarginUDnVUp`,
`accMarginUUpVDn`,
`accMarginUUpVUp`,
`counter`,
`timestamp`
FROM `SRControl`.`MsgMarRiskCounter`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(16) */
`riskGroup` = 'Example_riskGroup'
AND
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';

Doc Columns Query

SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='MarRiskCounter' ORDER BY ordinal_position ASC;